Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions to compile all hardware combinations #84

Conversation

lenvm
Copy link
Collaborator

@lenvm lenvm commented Nov 10, 2023

What

This pull request implements automated compilation of the Arduino sketch for all hardware targets.
It does this by adding separate GitHub Actions to compile for all batteries, for all inverters, and for the combination of all batteries and inverters.

How

This pull request adds:

  • a GitHub Action to compile all batteries in combination with the inverter communication protocol BYD_MODBUS. This action is performed on each push/pull request. It currently runs 7 jobs.
  • a GitHub Action to compile all inverter communication protocols in combination with the battery NISSAN_LEAF_BATTERY. This action is performed on each push/pull request. It currently runs 7 jobs.
  • a GitHub Action to compile all combinations of batteries and inverter communication protocols. This action can be triggered manually, and is performed for releases, to guarantee that all combinations of batteries and inverter communication protocols compile. It currently runs 7x7 = 49 jobs.

In order to achieve this, this pull request:

  • comments out all #define macros related to batteries and inverters in USER_SETTINGS.h.
  • removes the GitHub Action that directly compiles the Arduino sketch, as the sketch does not compile without defining the #define macros, and this GitHub Action is superseded by the GitHub Actions added in this pull request.

Why

It is extremely useful to continuously check if the code compiles for all hardwares that the code intends to support.

- comment out all #define macros related to batteries and inverters in USER_SETTINGS.h
- remove workflow to compile arduino sketch, as the sketch does not compile without defining the #define macros
- add workflow to compile all batteries in combination with the inverter communication protocol: BYD_MODBUS
- add workflow to compile all inverter communication protocols in combination with the battery: NISSAN_LEAF_BATTERY
- add workflow to compile all combinations of batteries and inverter communication protocols. This workflow can be triggered manually.
@lenvm lenvm changed the title add workflows for GitHub Actions to compile different hardware combinations Add GitHub Actions to compile all hardware combinations Nov 10, 2023
Copy link
Owner

@dalathegreat dalathegreat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What! I thought this wasn't possible with Github actions, but you made it work! 🤯 Respect!

@lenvm lenvm merged commit 1ae7d51 into dalathegreat:main Nov 10, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants